//       https://ac.nowcoder.com/acm/problem/221681



#include <iostream>
using namespace std;

int main()
{
    int n, x;
    cin >> n >> x;
    int a[n + 1];
    int sum = 0;
    int o = 0, p = 0;
    int q = 0x3f3f3f3f, j = 1;
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i];
        sum += a[i];
        while (sum >= x)
        {
            if (i - j < q)
            {
                q = i - j;
                o = j;
                p = i;
            }
            sum -= a[j++];
        }
    }
    cout << o << ' ' << p << endl;

    return 0;
}